package com.github.baichuan.application.scaffold.rest.dto.membership;

import com.github.baichuan.mapping.Mapping;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

@Schema(title = "应用用户")
@Getter
@Setter
public class ApplicationMemberGridView {

    @Mapping
    private String id;

    @Schema(title = "登陆名")
    @Mapping("member.loginName")
    private String loginName;

    @Schema(title = "姓名")
    @Mapping("member.name")
    private String name;

    @Schema(title = "邮箱")
    @Mapping("member.email")
    private String email;

    @Schema(title = "手机")
    @Mapping("member.mobile")
    private String mobile;

    @Schema(title = "所属机构名称")
    @Mapping("org.name")
    private String orgName;

    @Schema(title = "用户类型")
    @Mapping
    private String memberType;

    @Schema(title = "过期日期")
    @Mapping(format = "yyyy-MM-dd")
    private String expire;

    @Schema(title = "登陆次数")
    @Mapping
    private int loginCount;

    @Schema(title = "注册时间")
    @Mapping(format = "yyyy-MM-dd")
    private String createTime;
}
